package Day2025_02_21;

/**
 * 实现 Runnable 接口
 */

public class Demo02_Thread {
    public static void main(String[] args) {
        myThread02 myThread02 = new myThread02();
        Thread thread = new Thread(myThread02);
        thread.start();
    }
}

class myThread02 implements Runnable {
    @Override
    public void run() {
        while (true) {
            System.out.println("hello my thread");
        }
    }
}